package com.hospital;

import java.util.ArrayList;
import java.util.UUID;

public class Department {
    private String id;
    private String name;
    private ArrayList<Doctor> doctors = new ArrayList<>();

    public Department() {
        this.id = UUID.randomUUID().toString();

    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<Doctor> getDoctors() {
        return doctors;
    }

    public void addDoctor(Doctor doctor) {
        this.doctors.add(doctor);
    }

    public void setDoctors(ArrayList<Doctor> doctors) {
        this.doctors = doctors;
    }

    @Override
    public String toString() {
        return "{id=" + id + ", name=" + name + ", doctors=" + doctors + "}";
    }

}
